<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>

<div class="t_bar"><span class="color_red">*</span>单位人员情况</div>
	<table class="t_css" width="100%" id="org_psns" border="0" cellpadding="0"
	    cellspacing="1">
		<col style="width: 15%"/>
		<col style="width: 9%"/>
		<col style="width: 16%"/>
		<col style="width: 15%"/>
		<col style="width: 15%"/>
		<col style="width: 15%"/>
		<col style="width: 15%"/>
		
		<tr>
			<td align="right"  colspan="2">职工总数（人）：</td>
			<td align="center" colspan="2"> 
				<span name="organization_persons/people_count_total">
					<x:out select="$xmlData/data/organization_persons/people_count_total"/>
			    </span>
			</td>
			<td align="right" colspan="2">研发人员数（人）：</td>
			<td align="center">
				<span name="organization_persons/job_yanfa">
					<x:out select="$xmlData/data/organization_persons/job_yanfa"/>
			    </span>
			    <input type="hidden" id="job_yanfa" name="organization_persons/job_yanfa" label="研发人员数" value="<x:out select="$xmlData/data/organization_persons/job_yanfa"/>">
				<input type="hidden" id="psn_xl_total" name="organization_persons/psn_xl_total" value="<x:out select="$xmlData/data/organization_persons/psn_xl_total"/>" class="valueEqual:psn_xl_total:job_yanfa" label="研发人员学历总数">
				<input type="hidden" id="psn_zc_total" name="organization_persons/psn_zc_total" value="<x:out select="$xmlData/data/organization_persons/psn_zc_total"/>" class="valueEqual:psn_zc_total:job_yanfa" label="研发人员技术职称总数">
			</td>
		</tr>
		<tr align="center">
			<td rowspan="2" colspan="2" align="right">研发人员学历（人）：</td>
			<td>博士</td>
			<td>硕士</td>
			<td>本科</td>
			<td>专科</td>
			<td>其他</td>
		</tr>
		<tr>
			<td align="center">
				<input name="proposal/psn_doctor" id="psn_doctor" label="研发人员学历-->博士" type="text" onfocus="InitInput.setNumber(this,9,0,0);" 
				class="input_css required" onchange="countPsn();"  style="width:80%;text-align: right;"  value="<x:out select="$xmlData/data/proposal/psn_doctor" />"/>
			</td>
			<td align="center">
				<input name="proposal/psn_master" id="psn_master" label="研发人员学历-->硕士" type="text" onfocus="InitInput.setNumber(this,9,0,0);" 
				class="input_css required" onchange="countPsn();"  style="width:80%;text-align: right;"  value="<x:out select="$xmlData/data/proposal/psn_master" />"/>
			</td>
			<td align="center">
				<input name="proposal/psn_bachelor" id="psn_bachelor" label="研发人员学历-->本科" type="text" onfocus="InitInput.setNumber(this,9,0,0);" 
				class="input_css required" onchange="countPsn();"  style="width:80%;text-align: right;"  value="<x:out select="$xmlData/data/proposal/psn_bachelor" />"/>
			</td>
			<td align="center">
				<input name="proposal/psn_junior" id="psn_junior" label="研发人员学历-->专科" type="text" onfocus="InitInput.setNumber(this,9,0,0);" 
				class="input_css required" onchange="countPsn();"  style="width:80%;text-align: right;"  value="<x:out select="$xmlData/data/proposal/psn_junior" />"/>
			</td>
			<td align="center">
				<input name="proposal/psn_other" id="psn_other" label="研发人员学历-->其他" type="text" onfocus="InitInput.setNumber(this,9,0,0);" 
				class="input_css required" onchange="countPsn();"  style="width:80%;text-align: right;"  value="<x:out select="$xmlData/data/proposal/psn_other" />"/>
			</td>
		</tr>
		
		<tr align="center">
			<td rowspan="2" colspan="2" align="right">研发人员技术职称（人）：</td>
			<td>高级职称</td>
			<td>中级职称</td>
			<td>初级职称</td>
			<td style="border-right: none;">其他</td>
			<td style="border-left: none;"></td>
		</tr>
		<tr>
			<td align="center">
				<input name="proposal/psn_high" id="psn_high" label="研发人员技术职称-->高级职称" type="text" onfocus="InitInput.setNumber(this,9,0,0);" 
				class="input_css required" onchange="countPsn();"  style="width:80%;text-align: right;"  value="<x:out select="$xmlData/data/proposal/psn_high" />"/>
			</td>
			<td align="center">
				<input name="proposal/psn_middle" id="psn_middle" label="研发人员技术职称-->中级职称" type="text" onfocus="InitInput.setNumber(this,9,0,0);" 
				class="input_css required" onchange="countPsn();"  style="width:80%;text-align: right;"  value="<x:out select="$xmlData/data/proposal/psn_middle" />"/>
			</td>
			<td align="center">
				<input name="proposal/psn_low" id="psn_low" label="研发人员技术职称-->初级职称" type="text" onfocus="InitInput.setNumber(this,9,0,0);" 
				class="input_css required" onchange="countPsn();"  style="width:80%;text-align: right;"  value="<x:out select="$xmlData/data/proposal/psn_low" />"/>
			</td>
			<td align="center" style="border-right: none;">
				<input name="proposal/psn_hight_other" id="psn_hight_other" label="研发人员技术职称-->其他" type="text" onfocus="InitInput.setNumber(this,9,0,0);" 
				class="input_css required" onchange="countPsn();"  style="width:80%;text-align: right;"  value="<x:out select="$xmlData/data/proposal/psn_hight_other" />"/>
			</td>
			<td style="border-left: none;"></td>
		</tr>
		
		
		<tr>
			<td align="right"  colspan="3">引进省 高层次科技人才团队数量（个）：</td>
			<td align="center"> 
				<input name="proposal/psn_sgctd" id="psn_sgctd" label="引进省 高层次科技人才团队数量" type="text" onfocus="InitInput.setNumber(this,9,0,0);"  class="input_css required "  style="width:80%;text-align: right;"  value="<x:out select="$xmlData/data/proposal/psn_sgctd" />"/>
			</td>
			<td align="right" colspan="2">外籍创新人才数量（人）：</td>
			<td align="center">
				<input name="proposal/psn_abroad" id="psn_abroad" label="外籍创新人才数量" type="text" onfocus="InitInput.setNumber(this,9,0,0);"  class="input_css required "  style="width:80%;text-align: right;"  value="<x:out select="$xmlData/data/proposal/psn_abroad" />"/>
			</td>
		</tr>
		
		
		
		<tr align="center">
			<td rowspan="4" colspan="2" align="right">引进高层次人才数（人 ）：</td>
			<td><%--千人计划人才--%></td>
			<td>万人计划人才</td>
			<td>国家杰出青年</td>
			<td>国家科技项目课题组长<br/>（首席科学家）</td>
			<td>长江学者</td>
		</tr>
		<tr>
			<td align="center">
<%--
				<input name="proposal/psn_thound" id="psn_thound" label="引进高层次人才数-->千人计划人才" type="text" onfocus="InitInput.setNumber(this,9,0,0);"  class="input_css required "  style="width:80%;text-align: right;"  value="<x:out select="$xmlData/data/proposal/psn_thound" />"/>
--%>
			</td>
			<td align="center">
				<input name="proposal/psn_10thound" id="psn_10thound" label="引进高层次人才数-->万人计划人才" type="text" onfocus="InitInput.setNumber(this,9,0,0);"  class="input_css required "  style="width:80%;text-align: right;"  value="<x:out select="$xmlData/data/proposal/psn_10thound" />"/>			
			</td>
			<td align="center">
				<input name="proposal/psn_gjjc" id="psn_gjjc" label="引进高层次人才数-->国家杰出青年" type="text" onfocus="InitInput.setNumber(this,9,0,0);"  class="input_css required "  style="width:80%;text-align: right;"  value="<x:out select="$xmlData/data/proposal/psn_gjjc" />"/>			
			</td>
			<td align="center">
				<input name="proposal/psn_ktzz" id="psn_ktzz" label="引进高层次人才数-->国家科技项目课题组长" type="text" onfocus="InitInput.setNumber(this,9,0,0);"  class="input_css required "  style="width:80%;text-align: right;"  value="<x:out select="$xmlData/data/proposal/psn_ktzz" />"/>			
			</td>
			<td align="center">
				<input name="proposal/psn_cjxz" id="psn_cjxz" label="引进高层次人才数-->长江学者" type="text" onfocus="InitInput.setNumber(this,9,0,0);"  class="input_css required "  style="width:80%;text-align: right;"  value="<x:out select="$xmlData/data/proposal/psn_cjxz" />"/>			
			</td>
		</tr>
		<tr align="center">
			<td>安徽省“115”产业创新团队</td>
			<td>安徽省创新创业领军人才特殊支持计划</td>
			<td style="border-right: none;">其他</td>
			<td style="border-left: none;" colspan="2"></td>
		</tr>
		<tr>
			<td align="center">
				<input name="proposal/psn_ctcxtd" id="psn_ctcxtd" label="引进高层次人才数-->安徽省“115”产业创新团队" type="text" onfocus="InitInput.setNumber(this,9,0,0);"  class="input_css required "  style="width:80%;text-align: right;"  value="<x:out select="$xmlData/data/proposal/psn_ctcxtd" />"/>			
			</td>
			<td align="center">
				<input name="proposal/psn_tszcjh" id="psn_tszcjh" label="引进高层次人才数-->安徽省创新创业领军人才特殊支持计划" type="text" onfocus="InitInput.setNumber(this,9,0,0);"  class="input_css required "  style="width:80%;text-align: right;"  value="<x:out select="$xmlData/data/proposal/psn_tszcjh" />"/>			
			</td>
			<td align="center" style="border-right: none;">
				<input name="proposal/psn_yj_other" id="psn_yj_other" label="引进高层次人才数-->其他" type="text" onfocus="InitInput.setNumber(this,9,0,0);"  class="input_css required "  style="width:80%;text-align: right;"  value="<x:out select="$xmlData/data/proposal/psn_yj_other" />"/>			
			</td>
			<td style="border-left: none;" colspan="2"></td>
		</tr>

		<tr>
			<td rowspan="3" align="right">机构负责人 ：</td>
			<td align="right">姓名：</td>
			<td>
				<input name="proposal/unit_fzr_psnname" width="80%" class="required"  label="机构负责人-->姓名" type="text" value="<x:out select="$xmlData/data/proposal/unit_fzr_psnname" />"/>
			</td>
			<td align="right">年龄：</td>
			<td align="center">
				<input type="text" id="fzr_birthday" width="80%" class="required" onfocus="InitInput.setNumber(this,5,0,0);"
					   label="机构负责人-->年龄" name="proposal/fzr_age" value="<x:out select="$xmlData/data/proposal/fzr_age" />"/>
			</td>
			<td align="right">学历：</td>
			<td align="center">
				<c:set var="educate"><x:out select="$xmlData/data/proposal/educate_value" /></c:set>
				<cpt:select key="educate" id="educate" onChange="initControlValue(this.id);" value="${educate}" className="selectWidth"/>
				<input id="educate_value" name="proposal/educate_value" type="hidden" value="${educate}" class="required"  label="机构负责人-->学历">
				<input id="educate_name" name="proposal/educate_name" type="hidden" value="<x:out select='$xmlData/data/proposal/educate_name' />"></td>
			</td>
		</tr>
		<tr>
			<td align="right">电子邮箱：</td>
			<td><span name="proposal/email"><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/email"/></span>
			</td>
			<td align="right">手机：</td>
			<td align="center">
				<span name="proposal/mobile"><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/mobile"/></span>
			</td>
			<td align="right">联系电话：</td>
			<td align="center">
				<span name="proposal/tel_work"><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/tel_work"/> </span>
			</td>
		</tr>
		<tr>
			<td align="right">职称：</td>
			<td align="center" colspan="2">
				<c:set var="proftitlevalue"><x:out select="$xmlData/data/proposal/prof_title_value" /></c:set>
				<cpt:tree key="prof_title" cacheable="false" readonly="true" value="${proftitlevalue}" id="prof_title" name="prof_title"
						  showPattern="all" shieldPattern="-1" onClick="initTreeValueExt"   label="机构负责人-->职称" />
				<input type="hidden" id="prof_title_value" class="required"  name="proposal/prof_title_value" value="<x:out select='$xmlData/data/proposal/prof_title_value' />"  label="机构负责人-->职称" />
				<input type="hidden" id="prof_title_name" name="proposal/prof_title_name" value="<x:out select='$xmlData/data/proposal/prof_title_name' />" /></td>

			</td>
			<td align="right">任现职时间：</td>
			<td colspan="2">&nbsp;
				<c:set var="in_time"><x:out select="$xmlData/data/proposal/in_time"/></c:set>
				<cpt:date id="in_time" name="proposal/in_time" label="机构负责人-->任现职时间" value="${in_time }" className=" required  date  dateCompareBeforeE:in_time:today"  size="14" ></cpt:date>
			</td>
		</tr>
	</table>
	
	<br/>
	<div class="t_bar"><span class="color_red">*</span>负责人简介（限500字）</div>
	<table id="fzr_info" cellpadding="0" class="table01 t_css" width="100%" border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid;">
					<col style="width:34%"/>
					<col style="width:40%"/>
					<col style="width:13%"/>
					<col style="width:13%"/>
					<tr>
						<td colspan="4">（有从事技术研发、成果转化及其相应管理经历，请列举说明）</td>
					</tr>
					<tr>
						<td colspan="4">
							<textarea name="proposal/fzr_goal" style="width:98%" class="input_textarea required  maxlength:500" label="负责人简介"   rows=10 cols=60><x:out select="$xmlData/data/proposal/fzr_goal" /></textarea>
							<input type="hidden" name="proposal/fzr_goal_hidden" id="proposal/fzr_goal_hidden" value="<x:out select="$xmlData/data/proposal/fzr_goal_hidden" />"/>
						</td> 
					</tr> 
	</table> 
<script type="text/javascript">
$(document).ready(function(){
	var str1 = '<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/birthday"/> ';
	var myDate = new Date();
	var str2 =myDate.getFullYear();
	var age = str2 - str1.substring(0,4);
	$("#fzr_age").html(age);
});
function initTreeValueExt(treeId, treeNode) {

	if (!(treeNode && (treeNode.level > 0 || !treeNode.isParent))) {
		scmWarn($("#" + treeId).attr("label")
				+ messageTip.researchAreaInvalidDisciplineCode);
		if (treeNode.level == 0) {
			$("#" + treeId).val("");
			$("#" + treeId).parents("td").find(
					"[name$='" + treeId + "_code'],[id$='" + treeId
							+ "_code']").val("");
			$("#" + treeId).parents("td").find(
					"[name$='" + treeId + "_value'],[id$='" + treeId
							+ "_value']").val("");
			$("#" + treeId).parents("td").find(
					"[name$='" + treeId + "_name'],[id$='" + treeId
							+ "_name']").val("");
		}

		return false;
	}

	var str = treeNode.name;
	var obj = treeNode.parentNode;

	while (obj != null) {
		obj = obj.parentNode;
	}

	$("#" + treeId).parents("td")
			.find(
					"[name$='" + treeId + "_code'],[id$='" + treeId
							+ "_code']").val(treeNode.id);
	$("#" + treeId).parents("td").find(
			"[name$='" + treeId + "_value'],[id$='" + treeId
					+ "_value']").val(treeNode.id);
	$("#" + treeId).parents("td")
			.find(
					"[name$='" + treeId + "_name'],[id$='" + treeId
							+ "_name']").val(str);

}

function countPsn(){
	var total1=0;
	var total2=0;
	var flag1=false;
	var flag2=false;
	$("#org_psns tr:eq(2) td").each(function(){
		var val1=parseFloat($(this).find("input").val());
		if(!!!val1){
			val1=0;
			flag1=true;
		}
		total1=total1+val1;
	});
	$("#org_psns tr:eq(4) td:lt(4)").each(function(){
		var val2=parseFloat($(this).find("input").val());
		if(!!!val2){
			val2=0;
			flag2=true;
		}
		total2=total2+val2;
	});
	if(flag1){
		$("#psn_xl_total").removeClass();
	}else{
		$("#psn_xl_total").removeClass().addClass("valueEqual:psn_xl_total:job_yanfa");
	}
	if(flag2){
		$("#psn_zc_total").removeClass();
	}else{
		$("#psn_zc_total").removeClass().addClass("valueEqual:psn_zc_total:job_yanfa");
	}
	$("#psn_xl_total").val(total1);
	$("#psn_zc_total").val(total2);
}
</script>		
